
package com.joysuch.wwyt.core.common.web;

import java.util.Date;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebBindingInitializer;

/**
 * 转换器绑定。绑定日期编辑器和字符串编辑器。
 * 
 * 
 */
public class BindingInitializer implements WebBindingInitializer {
    public void initBinder(WebDataBinder binder) {
        DateEditor dateEditor = new DateEditor();
        binder.registerCustomEditor(Date.class, dateEditor);
        binder.registerCustomEditor(String.class, new StringEmptyEditor());
    }

}
